package com.keven.dp.facade;

public class Computer implements BaseFuntion{
//	private CPU cpu;
//	private Memory memory;
//	private Disk disk;
	private BaseFuntion cpu,memory,disk;
	
	public Computer() {
		cpu = new CPU();
		memory =new Memory();
		disk= new Disk();
	}
	
	@Override
	public void startUp() {
		System.out.println("start the computer!");
		cpu.startUp();
		memory.startUp();
		disk.startUp();
		System.out.println("start computer finished!");
		
	}

	@Override
	public void shutDown() {
		System.out.println("begin to close the computer!");
		cpu.shutDown();
		memory.shutDown();
		disk.shutDown();
		System.out.println("computer closed!");
	}

	public void calculate(){
		
		System.out.println("start calculate");
	}
}
